<?php
if(!defined('InEmpireCMS'))
{
	exit();
}
?>
<?php
//查询SQL，如果要显示自定义字段记得在SQL里增加查询字段
$query="select id,classid,isurl,titleurl,isqf,havehtml,istop,isgood,firsttitle,ismember,username,plnum,totaldown,onclick,newstime,truetime,lastdotime,titlefont,titlepic,title from ".$infotb." where ".$yhadd."userid='$user[userid]' and ismember=1".$add." order by newstime desc limit $offset,$line";
$sql=$empire->query($query);
//返回头条和推荐级别名称
$ftnr=ReturnFirsttitleNameList(0,0);
$ftnamer=$ftnr['ftr'];
$ignamer=$ftnr['igr'];

$public_diyr['pagetitle']='管理信息';
$url="<a href='../../'>首页</a>&nbsp;>&nbsp;<a href='../member/cp/'>会员中心</a>&nbsp;>&nbsp;<a href='ListInfo.php?mid=$mid".$addecmscheck."'>管理信息</a>&nbsp;(".$mr[qmname].")";
require(ECMS_PATH.'e/template/incfile/header.php');
?>
<script type="text/javascript" src="/png/skin/default/js/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="/png/skin/default/js/jquery.lazyload.js"></script>

<style>
.home_box{background:#fff}
.search{margin:0;padding:22px 0;}
.scfm{position:absolute;}
.lm_fm{margin-bottom:40px;position:relative;}
.sx{background:#fff;margin-bottom:10px;box-shadow: 0 2px 6px rgba(0,0,0,0.1);}
.sx_ul{padding:20px;}
.sx_lab{float:left; color:#999;}
.sx_type{margin-left:66px;}
.sx_type_ul li{display:inline-block;margin-right:20px;}
.sx_type_ul li .one{color:#dd2727;}

</style>

<div class="center">
	<div class="home_box">
		<div class="" style="padding:10px;">
			<a href="ListInfo.php?mid=<?=$mid?>">已发布</a>  <a href="ListInfo.php?mid=<?=$mid?>&ecmscheck=1">待审核</a>
		</div>
	</div>
	

	<div class="lm_fm">
		<?
		while($r=$empire->fetch($sql))
		{
			//状态
			$st='';
			if($r[istop])//置顶
			{
				$st.="<font color=red>[顶".$r[istop]."]</font>";
			}
			if($r[isgood])//推荐
			{
				$st.="<font color=red>[".$ignamer[$r[isgood]-1]."]</font>";
			}
			if($r[firsttitle])//头条
			{
				$st.="<font color=red>[".$ftnamer[$r[firsttitle]-1]."]</font>";
			}
			//时间
			$newstime=date("Y-m-d",$r[newstime]);
			$oldtitle=$r[title];
			$r[title]=stripSlashes(sub($r[title],0,50,false));
			$r[title]=DoTitleFont($r[titlefont],$r[title]);
			//审核中
			if($indexchecked==0)
			{

				$scpic='<img class="lazy" src='.$r[titlepic].' data-original='.$r[titlepic].'/>';
				$scInof='<div class="sc_c_title">'.$r[title].'</div><span class="sc_c_info">审核中...</div>';
				
				$checked='<span>审核中...</span>';
				$titleurl="javascript:;";//链接
			}
			//审核通过
			else
			{	
				$scpic='<a href='.sys_ReturnBqTitleLink($r).' target="_blank"><img class="lazy" src='.$r[titlepic].' data-original='.$r[titlepic].'/></a>';
				$scInof='<a href='.sys_ReturnBqTitleLink($r).'>'.$r[title].'</a><span class="sc_c_info">下载：'.$r[totaldown].'</span>';
				
				$checked='√';
				$titleurl=sys_ReturnBqTitleLink($r);//链接
			}
			
			$plnum=$r[plnum];//评论个数
			//标题图片
			$showtitlepic="";
			if($r[titlepic])
			{$showtitlepic="<a href='".$r[titlepic]."' title='预览标题图片' target=_blank><img src='../data/images/showimg.gif' border=0></a>";}
			//栏目
			$classname=$class_r[$r[classid]][classname];
			$classurl=sys_ReturnBqClassname($r,9);
			$bclassid=$class_r[$r[classid]][bclassid];
			$br['classid']=$bclassid;
			$bclassurl=sys_ReturnBqClassname($br,9);
			$bclassname=$class_r[$bclassid][classname];
			//评论地址
			$pagefunr=eReturnRewritePlUrl($r['classid'],$r['id'],'doinfo',0,0,1);
			$eplurl=$pagefunr['pageurl'];
		?>
		<div class="scfm" id="news<?=$r[id]?>">
			<div class="scfm_bg">
				<div class="scfm_img">
					<?=$scpic?>
					<a class="btn btn_sc" href="javascript:;"><i class="iconfont icon-shoucang"></i></a>
					<a class="btn btn_xz" href="javascript:;">下载</a>
				</div>
				<div class="sc_title">
					<?=$scInof?>
				</div>
			</div>
		</div>
		<?
			}
		?>
	    <?=$returnpage?> 
	</div>
		
</div>

<script>
$(window).ready(function() {
    $("img.lazy").lazyload({
        effect : "fadeIn",
		threshold:0,
		load : function(){
			
		}
    });
	var left = -1,
				col  = 0,
				colSl = 4;
			var scfm = $('.scfm');
			$('.scfm').each(function(i){	
				if( left > colSl - 2 ){
					left = 0;
					col++;
				}else{
					left++;
				};
				
				if(col){
					pNodes = scfm.eq( $(this).index() - colSl );
				};
				$(this).css({
					left : 308 *left,
					top : col ? pNodes.outerHeight() + parseInt(pNodes.css("top")) : "0"
				});
			});
			$('.lm_fm').height($('.lm_fm')[0].scrollHeight);
	
	
});
</script>


<?php
require(ECMS_PATH.'e/template/incfile/footer.php');
?>